package org.brakepedal.server.support.http;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.jetbrains.annotations.NotNull;

@JsonDeserialize
public enum ResponseBodyStatus implements EnumConverter<String,String> {
    SUCCESS("success"),
    WARN("warn"),
    ERROR("error");

    private final String value;

    ResponseBodyStatus(String value) {
        this.value = value;
    }

    @Override
    @JsonValue
    public String getValue() {
        return value;
    }

    @Override
    public @NotNull String getKey() {
        return name().toLowerCase();
    }

}
